package niuke;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// 输入W Y x N
		// W 公司总人数
		// Y 平均年龄
		// x 职率为
		// N N年后
		// 获取总年龄
		Scanner sc = new Scanner(System.in);
		while (sc.hasNext()) {
			int W = sc.nextInt();

			double Y = sc.nextInt();

			double x = sc.nextDouble();

			int N = sc.nextInt();

			double yearSum = W * Y;
			for (int i = 0; i < N; i++) {
				yearSum = ((yearSum - ((Y - 21) * W * x)) + (W * (1 - x)));
				Y = yearSum / W;
			}
			System.out.println((int) Math.ceil(yearSum / W));
		}
	}

}
